/*
 * @Description:经典继承
 * @Author: admin
 * @Date: 2021-06-08 17:55:54
 * @LastEditors: admin
 * @LastEditTime: 2021-06-08 17:59:53
 */
function Animal (name) {
  this.name = name;
  this.colors = ['red', 'black'];
}
function Dog (name) {
  Animal.call(this, name);
  this.color = "white"
}
Animal.prototype.sayName = function () {
  console.log(this.name);
}
var dog = new Dog('二哈');
console.log(dog);